Conditional reply processing method, conditional reply giving agent system device, and program storage medium

ABSTRACT

If an intermediary agent device or a database agent device cannot uniquely reply to an inquiry message issued from a user agent device, it generates a conditional reply message and returns the generated message to the user agent device. When receiving the conditional reply, the user agent device presents the conditions required for the conditional reply or a reply to a user.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to an agent system, and more particularly to a conditional reply processing method and a conditional reply giving agent system device, which allow a message to be exchanged as a conditional reply if a reply can be made by imposing a condition despite the absence of a direct reply, and to a program storage medium for this implementation.

[0003] 2. Description of the Related Art

[0004] The WWW (World Wide Web) has been successful, and the Internet has rapidly become popular. As a result, huge amounts of information have begun to be placed on the Internet. In addition to the Internet, huge amounts of information in electronic forms are stored in on-line databases, etc.

[0005] However, users have difficulty to find their desired information. As is often the case, the users must view many screens one by one in order to find out the information (page) that they actually desire, for example, with a method for tracing respective links or with a method for searching a list including a large amount of hit data obtained with a keyword search. As described above, the users cannot effectively use existing information. Therefore, a considerable load is imposed on busy users in terms of time and effort.

[0006] Especially, because there is no direct reply to an inquiry request made between agents due to the insufficiency of conditions although there is actually a useful reply, it is sometimes impossible to obtain a reply to the inquiry. Therefore, an agent processing technique with flexibility is required, for example, for a search of data distributed and located in a network.

[0007] An agent system is a technique for allowing pieces of software to be linked by using software as an autonomous module, which is a software agent speaking a common language (such as ACL (Agent Communication Language). This system makes pieces of software communicate with each other as software agents, and links them, so that the information useful to a user can be collected without user's tracing links so as to retrieve desired information.

[0008] This agent system, however, fundamentally has the scheme that one agent gives a direct reply to an inquiry message transmitted by another agent.

[0009] Accordingly, there is no conventional scheme for coping with the case in which an agent on a reply side can give a reply by imposing some conditions although it has no direct reply.

[0010] Assume that a service to retrieve a product name, a production place and a unit price of an apple is requested to a database agent having a database of agricultural products. In this case, the unit price may sometimes vary depending on a deal amount and a producer, even if the name and production place of the apple are identical. With the conventional search, all of the different unit prices included in the database are simply searched and retrieved. In such a case, a meaningful reply cannot be obtained if also conditions such as a deal amount, etc. are searched, and the database agent cannot give an effective reply.

[0011] Additionally, if a reply cannot be determined due to the insufficiency of conditions, some database agents give a reply “no corresponding data”. Also in such a case, users cannot obtain their desired information.

[0012] Especially, in a system where one inquiry made by a user agent is distributed to a plurality of database agents via an intermediary agent, the conditions included in the inquiry, on which each of the plurality of database agents gives a reply to the inquiry, may sometimes differ depending on the database agents. How to cope with this phenomenon by the user agent or the intermediary agent in such a case is a problem.

[0013] Conventionally, there is the disadvantage that information is not notified to an opposing agent although the information about the inquiry exists in an agent on a reply side, as described above.

SUMMARY OF THE INVENTION

[0014] An object of the present invention is to provide a conditional reply processing method, a conditional reply giving agent system device, and a storage medium storing a conditional reply processing program, which allow a more refined information link between agents by transmitting a conditional reply and enabling the receiving side to perform processing if a reply can be given with the imposition of a condition.

[0015] A conditional reply giving agent system device according to the present invention comprises a replying unit, a presenting unit, a transmitting unit, a data storing unit, a conditional expression inputting unit, a searching unit, a determining unit, and an answering unit.

[0016] The first aspect of the present invention is that the replying unit obtains and gives a conditional reply in addition to a direct reply to a request made by a certain agent device. The presenting unit presents the contents of the reply including the conditional reply in the agent device which receives the reply.

[0017] The second aspect of the present invention is that a direct reply and a conditional reply to a request made to another agent device are integrated and given. The presenting unit presents the contents of the reply including the conditional reply to a user via a user interface unit when receiving the reply including the conditional reply to the request issued by another agent device.

[0018] The third aspect of the present invention is that the transmitting unit obtains a conditional reply and transmits the conditional reply message to a first agent device if it transmits the request message from a first agent device to a second agent device, and cannot obtain the unique reply from the second agent device due to the insufficiency of conditions for replying to the request. The presenting unit presents the contents of the reply including the conditional reply to a user via a user interface unit when receiving the conditional reply message from the third agent device.

[0019] The fourth aspect of the present invention is that the data storing unit stores a plurality of pieces of data to be searched. The conditional expression inputting unit inputs a conditional expression for retrieving desired data. The searching unit searches the data storing unit by using the conditional expression input by the conditional expression inputting unit. The determining unit determines whether or not the conditions of the conditional expression input by the conditional expression inputting unit are insufficient. The answering unit answers that the conditions are insufficient if they are determined to be insufficient.

BRIEF DESCRIPTION OF THE DRAWINGS

[0020]FIG. 1 is a block diagram explaining the outline of the present invention;

[0021]FIG. 2 is a block diagram exemplifying the configuration of the system to which the present invention is applied;

[0022]FIG. 3A is a flowchart showing the process performed by a message transmitting/receiving unit in a user agent device;

[0023]FIG. 3B is a flowchart showing the process performed by the message transmitting/receiving unit in the user agent device;

[0024]FIG. 3C is a flowchart showing the process performed by the message transmitting/receiving unit in the user agent device;

[0025]FIG. 4 is a flowchart showing the process performed by a substantial agent unit in the user agent device;

[0026]FIG. 5 is a flowchart showing the process performed by the substantial agent unit in the user agent device;

[0027]FIG. 6 is a flowchart showing the process performed by a conditional reply processing unit in the user agent device;

[0028]FIG. 7A is a flowchart showing the process performed by a user interface unit in the user agent device;

[0029]FIG. 7B is a flowchart showing the process performed by the user interface unit in the user agent device;

[0030]FIG. 8 is a flowchart showing the process performed by a substantial agent unit in an intermediary agent device;

[0031]FIG. 9 is a flowchart showing the process performed by a conditional reply processing unit in the intermediary agent device;

[0032]FIG. 10 is a flowchart showing the process performed by an inferring unit in the intermediary agent device;

[0033]FIG. 11 is a flowchart showing the process performed by a substantial agent unit in a database agent device;

[0034]FIG. 12 is a flowchart showing the process performed by an integrating unit in the database agent device;

[0035]FIG. 13 is a block diagram exemplifying the system configuration for explaining an embodiment;

[0036]FIG. 14 exemplifies a retrieval instruction input screen;

[0037]FIG. 15 exemplifies a retrieval instruction;

[0038]FIG. 16 exemplifies an ACL message;

[0039]FIG. 17 exemplifies a relational database;

[0040]FIG. 18 exemplifies the contents of a message;

[0041]FIG. 19 shows an example of an ACL list;

[0042]FIG. 20 shows another example of an ACL list;

[0043]FIG. 21 exemplifies a reply message;

[0044]FIG. 22 exemplifies registration made to the inferring unit;

[0045]FIG. 23 exemplifies the contents of a message;

[0046]FIG. 24A shows an example of a replacement pattern table;

[0047]FIG. 24B shows another example of the replacement pattern table;

[0048]FIG. 25 exemplifies an answer message;

[0049]FIG. 26 exemplifies an answer message;

[0050]FIG. 27A shows an example of an instruction issued to the user interface unit;

[0051]FIG. 27B shows another example of the instruction issued to the user interface unit;

[0052]FIG. 28 exemplifies a retrieval result display screen; and

[0053]FIG. 29 exemplifies a condition display.

DESCRIPTION OF THE PREFERRED EMBODIMENT

[0054] Provided below is the explanation about the details of the present invention by referring to the drawings.

[0055]FIG. 1 is a block diagram explaining the outline of the present invention.

[0056] A user agent device 1, an intermediary agent device (facilitator) 2 and a database agent device 3 are interconnected via a network 4. The user agent device 1, the intermediary agent device (facilitator) 2, and the database agent device 3 communicate with each other by using an ACL. The database agent device 3 allows an access from the user agent device 1, etc. by advertising its own capability to the intermediary agent device 2.

[0057] A user agent device 1 comprises a message transmitting/receiving unit 110, a substantial agent unit 120, and a user interface unit 130. The substantial agent unit 120 includes a conditional reply processing unit 121. The user interface unit 130 includes a conditional reply user interface unit 131.

[0058] The message transmitting/receiving unit 110 transmits/receives a message to/from another agent device.

[0059] The substantial agent unit 120 performs processing including a message process in the user agent device 1. For example, it processes the message transmitted from another agent device, and determines the next process of the user agent device 1. The substantial agent unit 120 also monitors a user instruction transmitted from the user interface unit 130. Additionally, it instructs the user interface unit 130 to perform display, transmits a message to another agent device, etc.

[0060] The conditional reply processing unit 121 processes a conditional reply message among the messages transmitted from another agent device, and passes the processed result to the substantial agent unit 120.

[0061] The user interface unit 130 processes a request input from a user, a message display for a user, etc. The conditional reply user interface unit 131 presents the contents of the reply including the conditional reply to a user, and further presents the details of the conditional reply according to a requirement such as a user instruction.

[0062] Furthermore, the user agent device 1 may comprise an inferring unit for satisfying all or part of the conditions of a conditional reply according to the pattern information for replacing a preregistered condition if the reply includes the conditional reply, when necessary.

[0063] The intermediary agent device (facilitator) 2 is a device for intermediating a request and a reply between other agent devices. The intermediary agent device 2 comprises a message transmitting/receiving unit 210, and a substantial agent unit 220. The substantial agent unit 220 includes a conditional reply processing unit 221, and an inferring unit 222.

[0064] The message transmitting/receiving unit 210 processes the transmission/reception of a message from another agent device similar to the message transmitting/receiving unit 110 in the user agent device 1. The substantial agent unit 220 intermediates a requested message between agent devices.

[0065] The conditional reply processing unit 221 satisfies all or part of conditions of a conditional reply together with the inferring unit 222.

[0066] The inferring unit 222 stores replacement patterns for replacing a condition of a conditional reply, and replaces the condition of the reply passed from the conditional reply processing unit 221 with predetermined data based on the replacement patterns as much as it can.

[0067] The database agent device 3 comprises a message transmitting/receiving unit 310, a substantial agent unit 320, an integrating unit 330, and a relational database unit 340. The relational database unit 340 includes a condition unit 341.

[0068] The relational database unit 340 has the capability for managing a relational database.

[0069] The condition unit 341 is a unit in which conditions are described in the relational database.

[0070] The integrating unit 330 extracts and integrates normal information and a conditional reply in the relational database 340.

[0071] If a user issues a retrieval instruction to the user agent device 1 via the user interface unit 130, it is transmitted to the substantial agent unit 120. The substantial agent unit 120 selects another suitable agent device (such as the intermediary agent device 2, the database agent device 3, etc.), and transmits the retrieval instruction as a message via the message transmitting/receiving unit 110.

[0072] When the message from another agent device is received by the message transmitting/receiving unit 210 in the intermediary agent device 2, the reception of the message and its contents are notified to the substantial agent unit 220.

[0073] If the message is, for example, the message for requesting the intermediacy from the user agent device 1, the substantial agent unit 220 selects the intermediary destination of the database agent device 3, etc. according to the contents of the message, converts the intermediary message into a message which can be interpreted by the database agent device 3, etc, and transmits the converted message to the database agent device 3, etc. by using the message transmitting/receiving unit 210.

[0074] If the message received by the message transmitting/receiving unit 210 is, for example, the message including a conditional reply from the data agent device 3, the substantial agent unit 220 transmits to the conditional reply processing unit 221 the portion of the conditional reply included in the message. The conditional reply processing unit 221 passes the elements of the conditional reply to the inferring unit 222.

[0075] The inferring unit uses preregistered replacement patterns, replaces the passed elements with the values determined by the patterns as much as it can, and passes the result to the conditional reply processing unit 221. The conditional reply processing unit 221 satisfies all or part of the conditions by using the result from the inferring unit 222.

[0076] Additionally, the conditional reply processing unit 221 may transmit the message for requesting the satisfaction of the conditions to the database agent device 3 via the message transmitting/receiving unit 210 if necessary, and satisfies all or part of the conditions that can be solved with the obtained result. It passes all or part of the satisfied replies to the message transmitting/receiving unit 210.

[0077] The message transmitting/receiving unit 210 transmits the reply message including the conditional reply to the user agent device 1 or another agent device, which is the transmission source of the intermediary message.

[0078] When receiving the request message such as a retrieval request, etc. from the user agent device 1 or the intermediary agent device 2, the message transmitting/receiving unit 310 in the database agent device 3 notifies the substantial agent unit 310 of the reception of the message and its contents.

[0079] The substantial agent unit 320 analyzes the request message, and transmits it to the integrating unit 330. The integrating unit 330 analyzes that request message, and retrieves the relational database 340 in order to make a reply to the request. If the retrieval result includes the information from the condition unit 341, it is combined with another item of information, and structured as a conditional reply. The integrating unit 330 integrates these results and returns the integrated result to the substantial agent unit 320.

[0080] The substantial agent unit 320 transmits the integrated result to the user agent device 1 or the intermediary agent device 2, which has transmitted the request message, via the message transmitting/receiving unit 310, as the message replying to the request message.

[0081] When receiving the reply message including the conditional reply from the intermediary agent device 2 or the database agent device 3, the user agent device 1 notifies the substantial agent unit 120 of the reception of the reply message and its contents.

[0082] The substantial agent unit 120 transmits the portion of the conditional reply included in the message to the conditional reply processing unit 121. The conditional reply processing unit 121 outputs the instruction for the conditional reply user interface unit 131. The substantial agent unit 120 transmits the information for a display including this instruction to the user interface unit 130.

[0083] The user interface unit 130 transmits to the conditional reply user interface unit 131 the portion of the instruction for the conditional reply user interface unit 131, and displays the conditional reply.

[0084] The program for implementing processes in each of the above described units by using a computer can be stored in/onto a suitable storage medium such as a computer-readable portable medium memory, a semiconductor memory, a hard disk, etc.

[0085] According to the present invention, a new interface unit between agent devices is provided as described above. The significant differences from the conventional technique are described below.

[0086] The conventional agent system has the scheme that a unique value is replied to a requested item. However, the item value to be replied may sometimes relate to another item value. For example, a price may vary depending on a deal amount, a deal partner, a deal date, etc.

[0087] Also with the conventional technique, if the item value included in a database, etc. varies depending on conditions, all of which are specified from a user agent device, the item value satisfying the conditions can be accurately extracted. However, if the conditions are insufficient, there is no reply means despite the existence of the value replying to the requested item. Although the conditional reply means becomes necessary in such a case, it is impossible to implement this means, for example, for an SQL which is a relational database retrieval language.

[0088] For the agents making communications using an ACL (Agent Communication Language) which is a language common to agents, the scheme for making a reply with a condition imposed can be incorporated. The present invention implements this scheme.

[0089] According to the present invention, even if a reply to, for example, an inquiry message for requesting a price varies depending on a deal amount, or even if the deal amount is not specified in the inquiry message, the conditional reply message such as “the price per box is ¥2,000 if the deal amount is equal to or less than 50 boxes, and ¥1,900 if the deal amount is more than 50 boxes” is generated, and transmitted to a requesting source.

[0090] With such a conditional reply message, the user agent device 1 can recognize that another condition is required for uniquely determining the reply, while the intermediary agent device 2 or the database agent device 3 can notify the user agent device 1 that the reply value may vary depending on the condition. That is, negotiation can be made between the agent devices.

[0091]FIG. 2 exemplifies the configuration of the system to which the present invention is applied.

[0092] As shown in this figure, the present invention can be implemented by arbitrarily combining the user agent device 1, the intermediary agent device 2, and the database agent device 3, which are shown in FIG. 1.

[0093] In the example shown in FIG. 2, a user agent device 1A and a database agent device 3A are directly connected via a network. These devices may transmit/receive messages via an intermediary agent device 2A. The user agent devices 1A and 1B may be connected to a database agent device 3B via a plurality of intermediary agent devices 2A and 2B. The connection form is not limited to these implementations. An arbitrary form is possible.

[0094] Provided next are the explanations about the process flows of the respective units and the examples of the data structures of required tables in the respective agent devices shown in FIG. 1.

[0095] [1] Message Transmitting/Receiving Unit in the User Agent Device

[0096]FIGS. 3A, 3B, and 3C are flowcharts showing the process performed by the message transmitting/receiving unit 110 in the user agent device 1.

[0097] The process of the message transmitting/receiving unit 110 is composed of a message reception loop shown in FIG. 3A, and two passive processes shown in FIGS. 3B and 3C.

[0098] In the message reception checking process, it is checked whether or not there is a received message in step S10 as shown in FIG. 3A. If “YES”, the received message is stored in a list in step S11.

[0099] For the inquiry about whether or not there is a received message, the process shown in FIG. 3B is passively performed.

[0100] In step S12, it is determined whether or not there is the inquiry about whether or not there is a newly received message from the substantial agent device 120. If “YES”, the process goes to step S13, where the storage list of received messages is checked.

[0101] If it is determined that the newly received message is included in the storage list of received messages, that message is passed to the substantial agent unit 120 in step S14 and deleted from the list in step S15.

[0102] If it is determined that no newly received message is included in step S13, the absence of the newly received message is notified to the substantial agent unit 120 in step S16.

[0103] Additionally, for a message transmission request, the process shown in FIG. 3C is passively performed.

[0104] In step S17, it is determined whether or not the message transmission request is received. If “YES”, the process goes to step S18, where the message is transmitted to another specified agent device.

[0105] The data structure required for the message transmitting/receiving unit 110 in order to perform the above described process is a pointer pointing up to where the list of received messages or a received message is read out.

[0106] [2] Substantial Agent Unit in the User Agent Device

[0107]FIGS. 4 and 5 are flowcharts of the processes performed by the substantial agent unit 120 in the user agent device 1. The process of the substantial agent unit 120 in the user agent device 1 is composed of two process loops shown in FIGS. 4 and 5.

[0108] In the process for checking the instruction from the user interface unit 130, it is checked whether or not the instruction such as a retrieval instruction, etc. from the user interface unit 130 has been received in step S21. If “YES”, the process goes to step S22, where the retrieval instruction is converted into a message in an agent language. Then, the instruction for transmitting the converted retrieval message to a retrieval message transmission destination agent device is issued to the message transmitting/receiving unit 110 in step S23.

[0109] In the process for checking a message from another agent device, the inquiry about whether or not there is a newly received message is made to the message transmitting/receiving unit 110 in step S31 as shown in FIG. 5. In step S32, it is determined whether or not there is the newly received message. If “YES”, the newly received message is received from the message transmitting/receiving unit 110 in step S33. In step S34, the instruction to be passed to the user interface unit 130 is made empty so as to process the received message.

[0110] In step S35, the portion of each reply is sequentially extracted from the message list. In step S36, it is determined whether or not the message is the portion of a conditional reply. If “YES”, the portion of the conditional reply is passed to the conditional reply processing unit 121 in step S37. Then, the instruction for the conditional reply user interface unit 131 is received from the conditional reply processing unit 121, and added to the instruction to be passed to the user interface unit 130 in step S38.

[0111] If “NO” in step S36, the instruction of the portion of a normal reply for the user interface unit 130 is generated and added to the instruction to be passed to the user interface unit 130 in step S39.

[0112] In step S40, it is determined whether or not the portion of the reply yet to be processed is still left in the message list. If “YES”, the process in steps S35 through S39 is repeated until no more portion yet to be processed is left. If “NO” in step 40, the instructions obtained in the above described processes are unified and passed to the user interface unit 130 in step S41.

[0113] [3] Conditional Reply Processing Unit in the User Agent Device

[0114]FIG. 6 is a flowchart showing the process performed by the conditional reply processing unit 121 in the user agent device 1.

[0115] In step S51, the conditional reply processing unit 121 extracts the condition of the portion of the reply provided from the substantial agent unit 120. In step S52, the name of the item used in the condition is extracted. In step S53, the name of the item to which a value is assigned and the value are extracted. In step S54, the extracted name and value are structured into the instruction for the conditional reply user interface unit 131, and returned to the substantial agent unit 120.

[0116] As the information required for the above described process, the substantial agent unit 120 has a “retrieval message transmission destination agent device name”.

[0117] [4] User Interface Unit in the User Agent Device

[0118]FIGS. 7A and 7B are flowcharts of the process performed by the user interface unit 130 in the user agent device 1. The process of the user interface unit 130 is composed of two process loops.

[0119] In the process for checking the presence/absence of a retrieval instruction issued from a user, it is determined whether or not the retrieval instruction is issued from a user in step S61 as shown in FIG. 7A. If “YES”, the retrieval instruction is passed to the substantial agent unit 120 in step S62. The contents of the retrieval instruction passed from the user interface unit 130 is a list of item names to be searched and a list of retrieval conditions.

[0120] Next, in the process for checking the presence/absence of a display instruction issued from the substantial agent unit 120, it is determined whether or not there is the display instruction issued from the substantial agent unit 120 in step S63 as shown in FIG. 7B. If “YES”, display is performed according to the display instruction in step S64. In step S65, if the display instruction includes the instruction for the conditional reply user interface unit 131, it is passed to the conditional reply user interface unit 131. The contents of the display instruction for the conditional reply user interface unit 131 is the name of an item, a flag indicating whether or not the item is imposed with a condition, the list including that item, and the text describing the condition.

[0121] [5] Message Transmitting/Receiving Unit in the Intermediary Agent Device

[0122] Since the process of the message transmitting/receiving unit 210 in the intermediary agent device 2 is similar to that of the message transmitting/receiving unit 110 in the user agent device 1, which is shown in FIGS. 3A, 3B, and 3C, its explanation is omitted here.

[0123] [6] Substantial Agent Unit in the Intermediary Agent Device

[0124]FIG. 8 is a flowchart showing the process performed by the substantial agent unit 220 in the intermediary agent device 2.

[0125] The substantial agent unit 220 first inquires of the message transmitting/receiving unit 210 whether or not there is a newly received message in step S71. If “YES”, the newly received message is received from the message transmitting/receiving unit 210 in step S72. Then, it is checked whether or not the received message is a message for requesting the intermediacy to another agent device in step S72. If “YES”, the process goes to step S73. If “NO”, the process skips to step S76.

[0126] If the received message is an intermediacy request message issued from the user agent device 1, etc., the list of preregistered agent devices is referenced, the agent device which can make a reply (such as the database agent device 3) is extracted, and the intermediacy request message is converted into the message that the extracted agent device can interpret. Then, the converted message is transmitted to the agent device which can make a reply by using the message transmitting/receiving unit 210 in step S74. In step S75, it is determined whether or not the process for all of the preregistered agents is completed. If “NO”, the process in steps S73 and 74 is repeated until the process for all of the preregistered agents is completed. When the process for all of the agents is completed, control is returned to step S71 where a next newly received message is to be processed.

[0127] If the received message is not the intermediacy request message in step S72, it is determined whether or not the received message is the message replying to the intermediated message in step S76. If “NO”, control is transferred to the process according to that message or the process for a newly received message. If the received message is the reply message from the database agent device 3, etc., the contents of the message is passed to the conditional reply processing unit 221 in step S77. Then, the contents of the message is received from the conditional reply processing unit 221, and the reply message to be returned is edited in step S78. In step S79, it is checked whether or not all of the reply messages to the intermediated messages have been received. If “NO”, the process goes back to step S71, and waits for the reception of the next message.

[0128] If “YES” in step S79, the edited reply message is returned to the transmission source of the intermediacy request message, such as the user agent device 1, etc. by using the message transmitting/receiving unit 210 in step S80.

[0129] [7] Conditional Reply Processing Unit in Intermediary Agent Device

[0130] In step S91, the conditional reply processing unit 221 registers the information except for the contents of the message that the substantial agent unit 220 receives from the message transmitting/receiving unit 210 to the inferring unit 222. Then, the contents of the message is extracted in step S92. In step S93, it is checked whether or not the contents of the message is a reply list. If “NO”, the message is returned to the substantial agent unit 220 unchanged in step S94 and the process is terminated.

[0131] If the contents of the message is the reply list in step S93, the reply list which is the contents of the message is extracted in step S95. In step S96, the reply list is made empty.

[0132] Next, it is determined whether or not the reply list element yet to be processed is left in step S97. If “YES”, the element yet to be processed is extracted in step S98. The extracted element is passed to the inferring unit 222, and the result is received in step S99. If there is the result returned from the inferring unit 222, the resultant element is added to the list in step S100. The above described steps S97 through S100 are repeated. In step S101, when all of the reply list elements yet to be processed have been processed, that is, if no element yet to be processed is left in step S97, the contents of the original message is replaced by using the list formed with the process performed in step S100. The replaced message is then returned to the substantial agent unit 220 in step S102.

[0133] [8] Inferring Unit in the Agent Device

[0134]FIG. 10 is a flowchart showing the process performed by the inferring unit 222 in the intermediary agent device 2.

[0135] When the reply list elements are passed from the conditional reply processing unit 221, the inferring unit 222 sequentially applies the replacement patterns that the inferring unit 222 itself possesses in step S112. The calculation expressions included in the replacement patterns are executed in step S113. As a result of replacing with the patterns, it is determined whether or not the transmission of a message to another agent device becomes necessary in step S114. If “YES”, the message is transmitted to the corresponding agent device and an element is replaced with the result.

[0136] Then, it is determined whether or not no pattern to be replaced is left, whether or not the number of replacement patterns reaches a predetermined replacement limit number, or whether or not a predetermined replacement pattern condition is satisfied in step S116. The process in steps S112 through S115 is repeated until any of the above described determinations is made. If any of them is made, the element replaced with a pattern is returned to the conditional reply processing unit 21 in step S117, and the process is terminated.

[0137] For the above described process, the inferring unit 222 possesses a replacement pattern table and replacement restriction information such as a replacement limit number, etc.

[0138] [9] Message Transmitting/Receiving Unit in the Database Agent Device

[0139] Because the process of the message transmitting/receiving unit 310 in the database agent device 3 is similar to that of the message transmitting/receiving unit 110 in the user agent device 1, which is shown in FIGS. 3A, 3B, and 3C, its explanation is omitted here.

[0140] [10] Substantial Agent Unit in the Database Agent Device

[0141]FIG. 11 is a flowchart showing the process performed by the substantial agent unit 320 in the database agent device 3.

[0142] In step S121, the inquiry about whether or not there is a newly received message is made to the message transmitting/receiving unit 310. In step S122, it is determined whether or not there is the newly received message. If “YES”, the newly received message is received form the message transmitting/receiving unit 310 in step S123. Then, the contents of the retrieval itself is extracted from the message in step S124, and passed to the integrating unit 330. In step S125, the contents of the resultant reply message is received from the integrating unit 330.

[0143] Next, it is checked whether or not the received message includes the instruction of a reply destination in step S126. If “YES”, the reply message is transmitted to the instructed agent device in step S127. If “NO” in step S127, the reply message is transmitted to the agent device at the transmission source in step S128.

[0144] [11] Integrating unit in the database agent device

[0145]FIG. 12 is a flowchart showing the process performed by the integrating unit 330 in the database agent device 3.

[0146] In step S131, the integrating unit 330 receives the contents of the retrieval from the substantial agent unit 320. In step S132, the contents of the retrieval written in an agent language (such as an ACL) is converted into those in an inquiry language (such as an SQL (Structured Query Language)) of the relational database unit 340. In step S133, the condition that the item “condition” has no value” is first added to the conversion result, which is passed to the relational database 340, and the result is received. In step S134, the received result is converted into the agent language.

[0147] In step S135, the condition that the item “condition” has a value” is added to the result of the conversion into the inquiry language in step S132; the conversion result with the condition added is passed to the relational database 340; and the result is received. In step S136, the portion returned as the value of the item “condition” is recognized as the portion of the condition of the conditional reply, and combined with another result. In step S137, the combined result is converted into the agent language.

[0148] In step S138, the result of the conversion into the agent language is integrated and formed as a reply message, and returned to the substantial agent unit 320.

[0149] [12] Condition Unit in the Database Agent Device

[0150] The condition unit 341 included in the relational database 340 in the database agent device 3 is implemented as a string which is one of the items (condition item) whose character string is composed of normal values in the relational database. The record on which no condition is imposed has no value in this condition item. The record on which a condition is imposed has the condition represented in an agent language in the condition item as a character string.

[0151] Provided next is the explanation about the specific embodiment to which the present invention is applied. FIG. 13 is a block diagram exemplifying the system configuration for explaining this embodiment, and shows an agent system which allows a message including a conditional reply to be exchanged.

[0152] Note that the system according to this embodiment has an additional processing capability for exchanging a message including a conditional reply on the basis of the agent system disclosed in the following documents.

REFERENCE DOCUMENTS

[0153] “SAGE (Smart AGent Environment)—Virtual Catalog”, Fumihiro MARUYAMA et al., 54th National Conference Lecture Paper Collection of Information Processing Society, vol.3, pp.129-130

[0154] “SAGE: Virtual Catalog—System Design” Ryusuke MASUOKA et al, 54th National Conference Lecture Paper Collection of Information Processing Society, vol.3, pp.131-132,

[0155] “SAGE: Virtual Catalog—User Agent” Tamami SUGASAKA et al, 54th National Conference Lecture Paper Collection of Information Processing Society, vol.3, pp.133-134

[0156] “SAGE: Virtual Catalog—Putting a Database into an Agent” Yo SATO et.al., 54th National Conference Lecture Paper Collection of Information Processing Society, vol.3, pp.135-136

[0157] The agent device 1, the intermediary agent device 2, and the database agent devices 3 and 3′ respectively have the capabilities of the agent device 1, the intermediary agent device 2, and the database agent device 3, which are shown in FIG. 1. The agent device 1, the intermediary agent device 2, and the database agent devices 3 and 3′ communicate with each other by using the ACL (Agent Communication Language) as a language common to the agents.

[0158] The ACL is an inter-agent communication language which stipulates messages exchanged between agents. It is composed of a KIF (Knowledge Interchange Format) which declaratively states knowledge such as the contents of information, etc.; a KQML (Knowledge Query and Manipulation Language) which is the language for stipulating the portion (called performative) corresponding to the verb prescribing a transaction of an inter-agent communication; and ontology which is a common term system common to agents.

[0159] To make a communication between agents by using the ACL, actual information must be put into an abstract form as the knowledge (VKB: Virtual Knowledge Base) possessed by the agents. Since handled information is a database in the configuration shown in FIG. 13, the information in each database, which is put into an abstract form, will become the VKB possessed by the database agent devices 3 and 3′. Here, the VKB for implementing a retrieval capability is defined as a “set of records from which specified field values can be extracted”.

[0160] The definition of the VKB in the KIF is as follows: (defrelation database (?db) := (and (set ?db) (exists (?set-of-fields) (and (set ?set-of-fields) (not (empty ?set-of-fields)) (forall (?record ?field) (=> (member ?record ?db) (member ?field ?set-of-fields) (defined (field-value ?record ?field))))))))

[0161] An access to the VKB is implemented by extracting part of the knowledge described in the VKB depending on a condition, and specifying the operation (such as a taking-out operation, erasing operation, rewrite operation, etc.) to be performed for the extracted knowledge.

[0162] If an access is made to the VKB by using the ACL, the knowledge of the VKB to be targeted by a KIF relation is extracted based on a KIF relation, and the operation to be performed for the extracted knowledge is specified with the performative in the KQML.

[0163] As the performative in the KQML, “ask-all/ask-one (asking)”, “reply (replying)”, “advertise (advertising)”, “sorry (notification that a reply cannot be made)”, etc. can be cited.

[0164] In the user agent device (device name: ua@ua-machine) 1, a user first requests a retrieval on a retrieval instruction input screen shown in FIG. 14. That is, the user inputs “apple” to a category cell, and presses a retrieval button. As a result, the user interface unit 130 in the user agent device 1 converts the user instruction into retrieval instruction data shown in FIG. 15, and passes this data to the substantial agent unit 120.

[0165] The substantial agent unit 120 converts the passed data into the ACL message which is shown in FIG. 16 and intended for transmitting the retrieval instruction shown in FIG. 15 to the retrieval massage transmission destination agent device name (assumed to be “facilitator@fac-machine” here), and transmits the converted ACL retrieval message. Note that the data handled by the agent system according to this embodiment is limited to “agricultural products”, and that the database agent device 3 is assumed to have the configuration shown in FIG. 1.

[0166] The intermediary agent device 2 which has received this retrieval message shown in FIG. 16 further transmits this retrieval message to a suitable agent device. The integrating unit 330 in the database agent device 3, which has lastly received this retrieval message, will operate as follows.

[0167] Here, assume that the relational database unit 340 in the database agent device 3 includes the information of a product master shown in FIG. 17 as a relational database table.

[0168] The integrating unit 330 receive the contents of the retrieval itself shown in FIG. 18 from the retrieval message shown in FIG. 16.

[0169] First of all, the retrieval message is converted into the following query language (assumed as an SQL here) of the relational database unit 340.

[0170] SELECT product name, production place, unit price

[0171] FROM product master

[0172] WHERE category=“apple”;

[0173] Additionally, the condition of having “no value” is added to the condition item (assumed as the item whose name is “condition” here), converted into the following form, and transmitted to the relational database 340.

[0174] SELECT product name, production place, unit price

[0175] FROM product master

[0176] WHERE category=“apple” AND condition is null;

[0177] Then, the relational database 340 returns the following result:

[0178] “delicious apple”, “Aomori Prefecture”, 1000

[0179] “ball apple”, “Hiroshima Prefecture”, 1500

[0180] If this result is converted into an ACL list form:

[0181] (“delicious apple”, “Aomori Prefecture”, 1000)

[0182] (“ball apple”, “Hiroshima Prefecture”, 1500

[0183] Next, the condition item is added as a retrieval target to the retrieval message which is shown in FIG. 16 and converted into the query language (SQL) of the relational database. The condition of having a value is added to the condition item, converted into the following form, and transmitted to the relational database 340.

[0184] SELECT product name, production place, unit price

[0185] FROM product master

[0186] WHERE category=“apple” AND condition is not null;

[0187] Then, the relational database 340 returns the following result. “conditional apple”, “Nagano Prefecture”, 2000, “(and (deal amount ?deal amount) (>= ?deal amount 50))” “condition exists · apple”, “Nagano Prefecture”, 2500, “(and (deal amount ?deal amount) (=< ?deal amount 60))” “multiple conditions exist · apple”, “Nagano Prefecture”, 3000 “and (deal amount ?deal amount) (producer ?producer) (>= ?deal amount 50) (= producer “Maruyama Farm”))”

[0188] This data is converted into an ACL list shown in FIG. 19.

[0189] Lastly, the obtained two ACL lists are integrated and the result shown in FIG. 20 is returned.

[0190] With the above described operations of the integrating unit 330, the database agent device 3 lastly transmits the reply message shown in FIG. 21.

[0191] The intermediary agent device 2 which receives the reply message including the conditional reply, which is shown in FIG. 21, attempts to satisfy the conditions as much as possible by using the conditional reply processing unit 221 and the inferring unit 222.

[0192] Here, assume that the intermediary agent device 2 (device name: facilitator@fac-machine) has received the message shown in FIG. 21.

[0193] First of all, the information except for the contents of the message are registered as the replacement patterns of the inferring unit 222 as shown in FIG. 22. This is because they might be used in order to satisfy the conditions.

[0194] Since the contents of the message shown in FIG. 21 is a reply list, the reply list which is the content of the message shown in FIG. 23 is extracted.

[0195] The conditional reply processing unit 221 passes each of the elements included in the reply list to the inferring unit 222, and adds each result to a new list.

[0196] The inferring unit 222 has, for example, replacement pattern tables shown in FIGS. 24A and 24B. The replacement pattern table shown in FIG. 24A indicates that all of deal amounts are 100, while the replacement pattern table shown in FIG. 24B indicates that the deal amounts are replaced with the result inquired to “omnipotent@heaven”.

[0197] Assuming that the inferring unit 222 has the replacement pattern table shown in FIG. 24A, the following operations are performed.

[0198] The initial two elements in the reply list shown in FIG. 23 are returned unchanged because they are normal replies. For example, “deal amount ?deal amount” in the third element in FIG. 23 matches the replacement pattern “(deal amount 100)”. (if (and(deal amount ?deal amount) (>= ?deal amount 50)) (listof “conditional apple” “Nagano Prefecture” 2000)) “?deal amount” shown in Fig.23 is replaced with “100”. Therefore, “(>= ?deal amount 50)” becomes “(>= 100 50)”, and the condition is satisfied. Consequently, the following list is returned. (“conditional apple” “Nagano Prefecture” 2000)

[0199] If the fourth element shown in FIG. 23 is processed in a similar manner, it becomes “(=<100 60)”. Therefore, the condition is not satisfied and the element is not returned. (if (and(deal amount ?deal amount) (=< ?deal amount 60)) (listof “condition exists · apple” “Nagano Prefecture” 2500))

[0200] Similarly, if the fifth element shown in FIG. 23 is processed, only part of the conditions is satisfied. (if (and(deal amount ?deal amount) producer ?producer) (>= ?deal amount 50) (= producer “Maruyama Farm”)) (listof “multiple conditions exist · apple” “Nagano Prefecture” 3000))

[0201] The result that part of the conditions is satisfied will become as follows. (if (and(deal amount ?deal amount) (producer “Maruyama Farm”)) (listof “multiple conditions exist · apple” “Nagano Prefecture” 3000))

[0202] Consequently, the conditional reply processing unit 221 returns the new reply message shown in FIG. 25.

[0203] If the inferring unit 222 having the replacement pattern table shown in FIG. 24B finds any matching before “(deal amount)”, it appends its own name (facilitator@fac-machine) to “:sender” and transmits the following message. (ask-one :receiver omnipotent@heaven :sender facilitator@fac-machine :aspect ?deal amount :content (deal amount ?deal amount)) Assume that the resultant message is like the following one. (reply :receiver facilitator@fac-machine :sender omnipotent@heaven content 100 )

[0204] In this case, the portion “?deal amount” in the reply list shown in FIG. 23 is replaced with the contents of the message “100”, and processed in a similar manner as in the case shown in FIG. 24A.

[0205] The user agent device 1 which has received these messages notifies the user via the conditional reply processing unit 121 and the conditional reply user interface unit 131 that the conditions exist. For example, if the user agent device 1 has received the reply message shown in FIG. 26, the substantial agent unit 120 extracts the contents of the message, extracts each of the elements in the reply list, and passes each to the conditional reply processing unit 121.

[0206] For the initial element in the reply list, the instruction that the conditional reply processing unit 121 returns to the user interface unit 130 will become the one shown in FIG. 27A.

[0207] Additionally, for the fifth element in the reply list, the instruction that the conditional reply processing unit 121 returns to the user interface unit 130 will become the one shown in FIG. 27B, to which the condition (“(and (producer ?producer) (=producer “Maruyama Farm”))”) is added.

[0208] As a display example displayed by the user interface unit 130, a dependent item is highlighted by some means or other as in the example of the retrieval result display screen shown in FIG. 28. Additionally, all of corresponding items according to a value may be displayed if the value is assigned to an item.

[0209] Furthermore, when the condition display button displayed on an exemplified screen of FIG. 28 is clicked, the condition of the conditional reply may be presented to a user by leaving the condition unchanged as shown in FIG. 29 or by putting the condition into a form easier to view for the user.

[0210] As described above, according to the present invention, a conditional reply message is transmitted if a reply can be made by imposing a condition to a retrieval message from user information, to which a reply cannot be originally made, so that an opposing side can perform processing. In this way, more delicate information link between agent device can be implemented, thereby providing more suitable information. 

What is claimed is:
 1. A conditional reply processing method for use in a system composed of a plurality of agent devices which transmit/receive messages, comprising the steps of: transmitting an inquiry message from a first agent device to a second agent device; generating a conditional reply message if the second agent device cannot make a unique reply due to the insufficiency of conditions for replying to the inquiry message from the first agent device; transmitting the generated conditional reply message from the second agent device to the first agent device; and presenting conditions required for the conditional reply or a reply to a user in the first agent device which receives the conditional reply massage.
 2. A conditional reply giving agent system for use in a system composed of a plurality of agent devices which transmit/receive messages, comprising: means for obtaining a conditional reply other than a direct reply to a request issued from a certain agent device; and means for presenting contents of a reply including the conditional reply to a user in an agent device which receives the reply.
 3. A conditional reply giving agent system for use in an agent system including a first agent device having a user interface unit and a second agent device which processes a request issued from another agent device, wherein the second agent device comprises a means for integrating a direct reply and a conditional reply to the request issued from another agent device, and making a reply; and the first agent device comprises a means for presenting contents of a reply including the conditional reply to a user by using a user interface unit, when receiving the reply including the conditional reply to the request issued from another agent device.
 4. The conditional reply giving agent system according to claim 3, wherein: said means for presenting the contents of the reply comprises a means for displaying a condition if the reply includes the conditional reply, and presenting details of the conditional reply according to a user instruction, in the first agent device.
 5. The conditional reply giving agent system according to claim 3, wherein said means for presenting the contents of the reply comprises a means for satisfying all or part of conditions in the conditional reply if the reply includes the conditional reply, in the first agent device.
 6. The conditional reply giving agent system according to claim 4, wherein said means for presenting the contents of the reply comprises a means for satisfying all or part of conditions in the conditional reply according to preregistered information if the reply includes the conditional reply, in the first agent device.
 7. A conditional reply giving agent system for use in an agent system including a first agent device having a user interface unit, a second agent device for processing a request from another agent device, and a third agent device for intermediating the request from another agent device to another agent device, wherein the third agent device comprises a means for obtaining a conditional reply and transmitting a conditional reply message to the first agent device, if a unique reply cannot be obtained from the second agent device due to insufficiency of conditions for replying to the request when the third agent device transmits a request message from the first agent device to the second agent device; and the first agent device comprises a means for presenting contents of the reply including the conditional reply by using the user interface unit, when receiving the conditional reply message from the third agent device.
 8. The conditional reply giving agent system according to claim 7, wherein the third agent device comprises a means for satisfying all or part of conditions in the conditional reply according to preregistered information if the reply obtained from the second agent device includes the conditional reply.
 9. A program storage medium for storing a program, which is to be executed in an agent device intermediating a request and a reply between agent devices, for directing a computer to perform the functions of: transferring a request from a first agent device to a second agent device which can process the request; and obtaining a conditional reply and transmitting the conditional reply if a unique reply cannot be obtained from the second agent device due to insufficiency of conditions for replying to the transferred request.
 10. The program storage medium according to claim 9, wherein the program further directs the computer to perform the function of: satisfying all or part of conditions in the conditional reply according to preregistered information, if the reply obtained from the second agent device includes the conditional reply.
 11. An information retrieving device, comprising: data storing means for storing a plurality of pieces of data to be searched; conditional expression inputting means for inputting a conditional expression for retrieving desired data; determining means for determining whether or not conditions of the conditional expression input by said conditional expression inputting means are insufficient; and answering means for answering that the conditions are insufficient if the conditions are determined to be insufficient by said determining means.
 12. The information retrieving device according to claim 11, further comprising: notifying means for notifying an insufficient portion of the conditional expression whose conditions are insufficient based on contents answered by said answering means.
 13. An information retrieving method, comprising the steps of: inputting a conditional expression for retrieving desired data; retrieving the desired data from the data to be searched by using the conditional expression; determining whether or not conditions of the conditional expression are insufficient; and answering that the conditions of the conditional expression are insufficient if the conditions are insufficient.
 14. A computer-readable storage medium storing an information retrieving program for directing a computer to perform the functions of: inputting a conditional expression for retrieving desired data; retrieving the desired data from the data to be searched by using the conditional expression; determining whether or not conditions of the conditional expression are insufficient; and answering that the conditions of the conditional expression are insufficient if the conditions are insufficient.
 15. An information retrieving method between agent devices in a system composed of a user agent device to which at least a user makes a direct access, and a database agent device which accesses an information database, comprising the steps of: transmitting an inquiry message from the user agent device to the database agent device; generating a conditional reply message to which an insufficient condition is added, by the database agent device if a unique reply cannot be given due to insufficiency of conditions for replying to the inquiry message; transmitting the conditional reply message from the database agent device to the user agent device; and presenting the received conditional reply message or the insufficient condition by the user agent device. 